package com.example.whatrubbish.model;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

public class Commodity implements Serializable {
    private Long id;

    @NotBlank
    private String title;

    @NotNull
    private Integer price;

    private Integer amount;

    private Date createTime;

    private Integer status;

    @NotBlank
    private String introduce;

    public Commodity(Long id, String title, Integer price, Integer amount, Date createTime, Integer status, String introduce) {
        this.id = id;
        this.title = title;
        this.price = price;
        this.amount = amount;
        this.createTime = createTime;
        this.status = status;
        this.introduce = introduce;
    }

    public Commodity() {
        super();
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title == null ? null : title.trim();
    }

    public Integer getPrice() {
        return price;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }

    public Integer getAmount() {
        return amount;
    }

    public void setAmount(Integer amount) {
        this.amount = amount;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getIntroduce() {
        return introduce;
    }

    public void setIntroduce(String introduce) {
        this.introduce = introduce == null ? null : introduce.trim();
    }
}